// 1
/* function a(){
    return
    {
        k:1
    }
}
t = a()
tt = {}
console.log(tt.k) //undefined
console.log(t.k) // Cannot read property 'k' of undefined */

/* function arg(day, w){
    console.log(arguments)
    day = '09-23'
    console.log(day,arguments[0])
    arguments[1] = 'true'
    console.log(w,arguments[1])
}
arg('22') */
/* function arg(day, w){
    day = '09-23'
    console.log(day,arguments[0])
    arguments[1] = 'true'
    console.log(w,arguments[1])
}
arg('22','k') */
// 包含剩余参数
// function tets(arg){
//     console.log(arguments)
//     console.log(arg)
//     var arg = 'hell0'
//     function arg(){}
//     console.log(arg)
// }
// tets('123')
/* let a = 0
async function print(){
    let r = a + await 10
    console.log('r',r)
}
print()
a++ */

/* let b = 0
async function print(){
    let t =await 10 + b
    console.log('t',t)
}
print()
b++ */
// var c = 0
// async function print(){
//     let t =await (10 + c)
//     console.log('tt',t)
// }
// print()
// c++

/* function req(){
    return new Promise(reslove =>{
        setTimeout(() => {
            reslove('结束')
        }, 2000);
    })
}
async function getReq(){
    console.log('开始执行')
    let res = await req()
    console.log(res)
    console.log('执行完毕')
}

getReq()
console.log('完毕') */

/* let obj = {
    result : 'right',
    arr:[4,5,6],
    loop: () =>{
        console.log(this.result)
        try{
            this.arr.map(()=>{
                console.log(thi.arr)
            })
        }catch(err){
            console.log('err')
        }
    }
}
// 箭头函数没有this,自然也就没有原型
console.log(obj.loop.prototype)
console.log(obj.loop.prototype === undefined)
// 
console.log("===");
obj.loop()

console.log('-----')
function fun(){}
let arr = [1,3,4]
console.log(typeof(arr));
console.log(typeof(typeof(arr)))
console.log(typeof(fun));
console.log(typeof(null));
console.log(typeof(undefined)); */

/* let str = 'str'
let obj = {name:'str'}
let arr = ['str']
function test(str,obj,arr){
    // let kk = [].pop.call(arguments)
    let res = Array.from(arguments)
    console.log(arguments)
    // let kk = Array.prototype.pop.call(arguments)
    // console.log(kk)
    str = 'string'
    obj.name = 'string'
    obj = {}
    arr.push('string')
    arr = []
}
test(str,obj,arr)
console.log(str,obj,arr) */

